﻿#ifndef CONFIG_H_
#define CONFIG_H_

#define NULL 0

#define MANAGEMAX 18
#define TYPEVALUEGETMAX 9
#define TOTALGUN 2

typedef unsigned char uint8;
typedef unsigned char uchar;

typedef unsigned short int uint16;
typedef short int int16;

typedef unsigned int uint32;

struct t_proinitmsg
{
    char devver[30];
	char prover[30];
	char devtype[30];
	char devnum[30];
	char gunnum[30];
};

struct t_startauth
{
    char authtype[30];//"card_auth" and "qrcode_auth"
    char cardno[30];
    char pwdtype[30];
    char flag[30];
    char failreason[50];
};

struct t_prodevyx
{
    char gunstate[10];
    char connectstate[10];
    char netstate[10];
};
struct t_prodevyc
{
    char yctype[10];
    char charingtime[20];
    char chargingpower[20];
    char outputvoltage[20];
    char outputcurrent[20];
    char outputkwh[20];
    char devstate[50];
    char chargingpoingmsg[100];
    char demandvoltage[20];
    char demandcurrent[20];
    char remaintime[20];
    char soc[20];
    char elecpcs[20];
    char serverpcs[20];
    char eleccost[20];
    char servercost[20];
    char totalcost[20];
    char settlepower[20];
    char settlecost[20];
    char settletime[20];
    char alarminfo[128];
};
struct t_prodevyk
{
    char gunno[5];
    char yk_type[20];
    char start_type[20];
    char start_value[20];
};

struct t_pwdauth
{  
  char gunno[50];	
  char type[50];	
  char cardno[50];	
  char password[50];	
};
struct t_pwdauthack
{
    char type[50];
    char cardno[50];
    char password[50];
    char flag[50];
};
struct keyvaluepair
{
    char key[50];
    char value[128];
};
struct t_filecheckack
{
   char filetype[50];
   char baseno[50];
   char totalnum[50];
   char readnum[50];
   struct keyvaluepair keyvaluebuf[MANAGEMAX];
};
struct t_filecheck
{
    char filetype[50];
    char baseno[50];
    char totalnum[50];
};
struct t_filechange
{
  char filetype[50];
  char type[50];
  char valuep[128];
};

#endif
